<me:UIFOLDER x:Class="WPFExcelReport.TDOCIMG"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                   xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
                    >
    <me:UIFOLDER.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>  
    </me:UIFOLDER.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="1*" /> 
        </Grid.ColumnDefinitions>
         <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
            <WrapPanel >
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="QueryCommand"/>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="SaveCommand"/>
                <TextBlock>根目录:</TextBlock>
                <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ART, ElementName=TV}" VerticalAlignment="Center" Width="180" />
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=自动探测}}" Click="DetectCommand"/>
                <TextBlock Text="{Binding Path=EXAUF,ElementName=TV}" Width="100" />
            </WrapPanel>  
        <DataGrid  Grid.Row="1" Grid.Column="0" 
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
            <DataGrid.Columns>              
                <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="60"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=LINKER}" Header="{Binding Source={Localization:Translate Word=链接}}"   Width="40"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=VRESION}" Header="{Binding Source={Localization:Translate Word=类型}}"   Width="40"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=ROOT}" Header="{Binding Source={Localization:Translate Word=目录}}"   Width="60"  MinWidth="140"/>
                <DataGridTextColumn Binding="{Binding Path=SUB}" Header="{Binding Source={Localization:Translate Word=子目录}}"   Width="60"  MinWidth="80"/>
             </DataGrid.Columns>            
        </DataGrid>
        </StackPanel>
        <Image  Name="cImage" Grid.Row="1"  Grid.Column="0"  Width="200" Height="200" VerticalAlignment="Center"
               Source="{Binding Path=PHOTOLINK, ElementName=TV}" 
               Stretch="UniformToFill" 
               MouseRightButtonUp="Image_MouseRightButtonUp" 
               MouseLeftButtonDown="Image_MouseLeftButtonUp"
        
               />
    </Grid>
</me:UIFOLDER>
